package com.softmaker.repository;

import com.softmaker.entity.MangerInfo;

import com.softmaker.entity.UserInfo;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;


public interface MangerInfoRepository extends JpaRepository<MangerInfo, String> {
    public MangerInfo findMangerInfoByMangerName(String mangerName);
    @Modifying
    @Query(value="delete from manger_info e where e.manger_name = ?1",nativeQuery = true)
    void deleteMangerInfoByMangerName(String mangerName);
    @Modifying
    @Query(value ="update manger_info e set e.password=?1 where e.manger_name=?2" ,nativeQuery = true)
    void updatePasswordByMangerName(String password,String mangerName);
    @Query(value = "select * from manger_info e where e.manger_name = ?1",nativeQuery = true)
    MangerInfo findByMangerName(String mangerName);
}
